/*============================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.

Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.

============================================================================*/

#ifndef QmitkPropertiesPreferencePage_h
#define QmitkPropertiesPreferencePage_h

#include <berryIQtPreferencePage.h>
#include <ui_QmitkPropertiesPreferencePage.h>

class QmitkPropertiesPreferencePage : public QObject, public berry::IQtPreferencePage
{
  Q_OBJECT
  Q_INTERFACES(berry::IPreferencePage)

public:
  static const QString FILTER_PROPERTIES;
  static const QString SHOW_ALIASES;
  static const QString SHOW_DESCRIPTIONS;
  static const QString SHOW_ALIASES_IN_DESCRIPTION;
  static const QString SHOW_PERSISTENCE_IN_DESCRIPTION;
  static const QString DEVELOPER_MODE;

  QmitkPropertiesPreferencePage();
  ~QmitkPropertiesPreferencePage() override;

  void CreateQtControl(QWidget* parent) override;
  QWidget* GetQtControl() const override;
  void Init(berry::IWorkbench::Pointer workbench) override;
  bool PerformOk() override;
  void PerformCancel() override;
  void Update() override;

private slots:
  void OnShowDescriptionsStateChanged(int state);

private:
  QWidget* m_Control;
  Ui::QmitkPropertiesPreferencePage m_Controls;
  berry::IPreferences::Pointer m_Preferences;
};

#endif
